package com.bweab.pojo;

import java.util.Objects;
/**
 * 宿舍信息实体类
 *
 * */
public class DormitoryTb {

    private int dormitoryId;//宿舍id
    private String dormitoryName;//宿舍名字
    private int dormitoryMonkey;//宿舍水电费所剩的费用

    public DormitoryTb() {
    }

    public DormitoryTb(int dormitoryId, String dormitoryName, int dormitoryMonkey) {
        this.dormitoryId = dormitoryId;
        this.dormitoryName = dormitoryName;
        this.dormitoryMonkey = dormitoryMonkey;
    }

    public int getDormitoryId() {
        return dormitoryId;
    }

    public void setDormitoryId(int dormitoryId) {
        this.dormitoryId = dormitoryId;
    }

    public String getDormitoryName() {
        return dormitoryName;
    }

    public void setDormitoryName(String dormitoryName) {
        this.dormitoryName = dormitoryName;
    }

    public int getDormitoryMonkey() {
        return dormitoryMonkey;
    }

    public void setDormitoryMonkey(int dormitoryMonkey) {
        this.dormitoryMonkey = dormitoryMonkey;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DormitoryTb that = (DormitoryTb) o;
        return dormitoryId == that.dormitoryId && dormitoryMonkey == that.dormitoryMonkey && Objects.equals(dormitoryName, that.dormitoryName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(dormitoryId, dormitoryName, dormitoryMonkey);
    }

    @Override
    public String toString() {
        return "DormitoryTb{" +
                "dormitoryId=" + dormitoryId +
                ", dormitoryName='" + dormitoryName + '\'' +
                ", dormitoryMonkey=" + dormitoryMonkey +
                '}';
    }
}
